/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.edu.amu.wmi.kino.visualjavafx.visualjavafxgui.editor;

import java.awt.Image;
import org.netbeans.core.spi.multiview.MultiViewDescription;
import org.netbeans.core.spi.multiview.MultiViewElement;
import org.openide.text.DataEditorSupport;
import org.openide.util.HelpCtx;
import org.openide.windows.TopComponent;
import pl.edu.amu.wmi.kino.visualjavafx.model.api.VisualJavaFxModelProvider;
import pl.edu.amu.wmi.kino.visualjavafx.visualjavafxgui.editor.visual.VisualJavaFxVisualEditor;

/**
 *
 * @author psychollek
 */
public class VisualJavaFxVisualEditorDescription implements MultiViewDescription{
    
    private DataEditorSupport es = null;
    private VisualJavaFxVisualEditor designer = null;

    public VisualJavaFxVisualEditorDescription(DataEditorSupport es) {
        this.es = es;        
    }


    @Override
    public int getPersistenceType() {
        return TopComponent.PERSISTENCE_ONLY_OPENED;
    }

    @Override
    public String getDisplayName() {
        return java.util.ResourceBundle.getBundle("pl/edu/amu/wmi/kino/visualjavafx/visualjavafxgui/Bundle").getString("Visual_View_Desc");
    }

    @Override
    public Image getIcon() {
        return null;
    }

    @Override
    public HelpCtx getHelpCtx() {
        return HelpCtx.DEFAULT_HELP;
    }

    @Override
    public String preferredID() {
        return "Visual_View_Description";
    }

    @Override
    public MultiViewElement createElement() {
        if (designer == null){
            designer = new VisualJavaFxVisualEditor(es);
        }
        return designer;
    }

}
